/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package TimeRecording.enums;

/**
 *
 * @author david
 */
public enum HolidayGrantType {
    
    ANNUAL("Annual"),
    AD_HOC("Ad Hoc"),
    SESSIONAL("Sessional");

    private String description;

    private HolidayGrantType(String description) {
        this.description = description;
    }

    @Override
    public String toString() {
        return description;
    }

    public static HolidayGrantType fromString(String match) {
        for (HolidayGrantType candidate : values()) {
            if (candidate.description.equals(match)) {
                return candidate;
            }
        }
        return valueOf(match);
    }
}
